package com.example.demo.mapper.novel;

import com.example.demo.entity.Novel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NovelMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Novel record);

    int insertSelective(Novel record);

    Novel selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Novel record);

    int updateByPrimaryKey(Novel record);
    
    int batchInsert(@Param("list") List<Novel> novels);

    List<Novel> getNovelsByKeyWord(String keyWord);

    int selectSize();

    List<Novel> selectPage(@Param("page") Integer page, @Param("limit") Integer limit);

    List<Novel> searchLike(
            @Param("page") Integer page,
            @Param("limit") Integer limit,
            @Param("keyWord") String keyWord);

    List<String> getNovelType();
}